#include<iostream>
#include<sstream>
#include<string>

int main() {
    int num = 42;
    double pi = 3.14159;
    std::ostringstream oss;

    // 将整数和浮点数写入 ostringstream
    oss << "The answer is "<< num << ", and the value of pi is " << pi;
    // 将 ostringstream 的内容转换为字符串
    std::string result = oss.str();

    std::cout<< result<< std::endl;

    return 0;
}